package com.example.user.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.common.api.user.service.RegisterService;
import com.example.common.model.User;
import com.example.user.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Auther: wyj
 * @Description:注册功能的service接口实现类
 */
@Service(version = "1.0.0")
@org.springframework.stereotype.Service
public class RegisterServiceImpl implements RegisterService {

    @Autowired
    private UserDao userDao;

    @Override
    public void register(User user) {
        //判断user是否为空
        if(user == null) {
            return;
        }

        //调用持久层方法查询user
        System.out.println("userDao:"+userDao);
        userDao.register(user);
    }
}
